home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / turbobasic.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  11KB  |  369 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  3. <!-- Turbobasic, 3/25/09 by Ben Dutcher  -->
  4. <!-- The Turbo Basic compiler was a Borland product.  It's way old.  My manual dates from 1987 -->
  5. <!-- The categories here are those in the manual, except where I couldn't get them to work.  -->
  6.  
  7. <MODE>
  8.     <PROPS>
  9.         <PROPERTY NAME="lineComment" VALUE="'" />
  10.     </PROPS>
  11.  
  12.     <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
  13.         <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
  14.             <BEGIN>"</BEGIN>
  15.             <END>"</END>
  16.         </SPAN>
  17.  
  18.         <!-- TurboBasic will use either symbol to start a comment -->
  19.         <EOL_SPAN TYPE="COMMENT1">'</EOL_SPAN>
  20.         <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
  21.  
  22.  
  23.         <!-- Comparison operators -->
  24.         <SEQ TYPE="OPERATOR"><</SEQ>
  25.         <SEQ TYPE="OPERATOR"><=</SEQ>
  26.         <SEQ TYPE="OPERATOR">>=</SEQ>
  27.         <SEQ TYPE="OPERATOR">></SEQ>
  28.         <SEQ TYPE="OPERATOR">=</SEQ>
  29.         <SEQ TYPE="OPERATOR"><></SEQ>
  30.  
  31.         <!-- indicate a named constant like %true.   Remember you need to define them once only.   Integers only.  -->
  32.         <SPAN_REGEXP HASH_CHAR="%" TYPE="MARKUP" AT_WORD_START="TRUE" NO_WORD_BREAK="TRUE">
  33.             <BEGIN>%</BEGIN>
  34.             <END>\S*</END>
  35.         </SPAN_REGEXP>
  36.  
  37.         <!-- Arithmetic operators -->
  38.         <SEQ TYPE="OPERATOR">+</SEQ>
  39.         <SEQ TYPE="OPERATOR">-</SEQ>
  40.         <SEQ TYPE="OPERATOR">*</SEQ>
  41.         <SEQ TYPE="OPERATOR">/</SEQ>
  42.         <SEQ TYPE="OPERATOR">\</SEQ>
  43.         <SEQ TYPE="OPERATOR">^</SEQ>
  44.         <SEQ TYPE="OPERATOR">mod</SEQ>
  45.  
  46.         <!-- File number marker like #3, but which also is used to indicate a double-precison variable like FineMeasuremet# -->
  47.         <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">#</SEQ>
  48.  
  49.         <!-- to handle "def FNmine(), etc.:  -->
  50.         <SEQ TYPE="KEYWORD1">def FN</SEQ>
  51.  
  52.         <!-- rather than enter option and base as separate keywords, since they are used only in this combination -->
  53.         <SEQ TYPE="KEYWORD1">option base</SEQ>
  54.  
  55.         <!--        <SEQ TYPE="NULL">_</SEQ>-->
  56.         <!-- Instruction separator -->
  57.         <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
  58.             AT_LINE_START="TRUE">:</MARK_PREVIOUS>
  59.  
  60.         <KEYWORDS>
  61.  
  62.         <!-- Weirdly enough, Turbo Basic doesn't support the words TRUE or FALSE
  63.             so I always define them in the code. with %false = 0: %true = not %false -->
  64.  
  65.         <!-- occasional test word.  It's not in the manual, but that would have been fun.  -->
  66.         <KEYWORD3>notalotta</KEYWORD3>
  67.  
  68.             <!-- Listed as keywords, but also described as unsupported:
  69.             list
  70.             usr, usr0-usr9
  71.             Just listed as unsupported:
  72.             auto, delete, edit, load, new, renum, save, cont, merge, motor
  73.             -->
  74.         <!-- Logical operators -->
  75.         <KEYWORD3>and</KEYWORD3>
  76.         <KEYWORD3>eqv</KEYWORD3>
  77.         <KEYWORD3>imp</KEYWORD3>
  78.         <KEYWORD3>not</KEYWORD3>
  79.         <KEYWORD3>or</KEYWORD3>
  80.         <KEYWORD3>xor</KEYWORD3>
  81.  
  82.             <!-- chaining -->
  83.             <KEYWORD1>chain</KEYWORD1>
  84.             <KEYWORD1>common</KEYWORD1>
  85.             <KEYWORD1>run</KEYWORD1>
  86.  
  87.             <!-- compiler control -->
  88.             <KEYWORD1>dim</KEYWORD1>
  89.             <KEYWORD1>lbound</KEYWORD1>
  90.             <KEYWORD1>let</KEYWORD1>
  91.             <KEYWORD1>local</KEYWORD1>
  92.             <!-- KEYWORD1>option base</KEYWORD1 -->
  93.             <KEYWORD1>rem</KEYWORD1>
  94.             <KEYWORD1>shared</KEYWORD1>
  95.             <KEYWORD1>static</KEYWORD1>
  96.             <KEYWORD1>tron</KEYWORD1>
  97.             <KEYWORD1>troff</KEYWORD1>
  98.             <KEYWORD1>ubound</KEYWORD1>
  99.  
  100.             <!-- devices -->
  101.             <!-- KEYWORD1>open com</KEYWORD1 -->
  102.             <KEYWORD1>com</KEYWORD1>
  103.             <KEYWORD1>inp</KEYWORD1>
  104.             <KEYWORD1>ioctl$</KEYWORD1>
  105.             <KEYWORD1>ioctl</KEYWORD1>
  106.             <KEYWORD1>out</KEYWORD1>
  107.  
  108.             <!-- DOS -->
  109.             <KEYWORD1>chdir</KEYWORD1>
  110.             <KEYWORD1>command$</KEYWORD1>
  111.             <KEYWORD1>date$</KEYWORD1>
  112.             <KEYWORD1>environ$</KEYWORD1>
  113.             <KEYWORD1>environ</KEYWORD1>
  114.             <KEYWORD1>kill</KEYWORD1>
  115.             <KEYWORD1>mkdir</KEYWORD1>
  116.             <KEYWORD1>rmdir</KEYWORD1>
  117.             <KEYWORD1>shell</KEYWORD1>
  118.             <KEYWORD1>system</KEYWORD1>
  119.             <KEYWORD1>time$</KEYWORD1>
  120.  
  121.             <!-- Error Handling -->
  122.             <KEYWORD1>eradr</KEYWORD1>
  123.             <KEYWORD1>erdev</KEYWORD1>
  124.             <KEYWORD1>erdev$</KEYWORD1>
  125.             <KEYWORD1>erl</KEYWORD1>
  126.             <KEYWORD1>error</KEYWORD1>
  127.             <KEYWORD1>err</KEYWORD1>
  128.  
  129.             <!-- files -->
  130.             <KEYWORD1>bload</KEYWORD1>
  131.             <KEYWORD1>bsave</KEYWORD1>
  132.             <KEYWORD1>close</KEYWORD1>
  133.             <KEYWORD1>eof</KEYWORD1>
  134.             <KEYWORD1>field</KEYWORD1>
  135.             <KEYWORD1>files</KEYWORD1>
  136.             <KEYWORD1>get</KEYWORD1>
  137.             <!-- KEYWORD1>line input #</KEYWORD1 -->
  138.             <KEYWORD1>loc</KEYWORD1>
  139.             <KEYWORD1>lof</KEYWORD1>
  140.             <KEYWORD1>lset</KEYWORD1>
  141.             <KEYWORD1>name</KEYWORD1>
  142.             <KEYWORD1>open</KEYWORD1>
  143.             <!-- KEYWORD1>print #</KEYWORD1 -->
  144.             <KEYWORD1>put$</KEYWORD1>
  145.             <KEYWORD1>put</KEYWORD1>
  146.             <KEYWORD1>reset</KEYWORD1>
  147.             <KEYWORD1>rset</KEYWORD1>
  148.             <KEYWORD1>seek</KEYWORD1>
  149.             <KEYWORD1>using</KEYWORD1>
  150.             <!-- KEYWORD1>write #</KEYWORD1 -->
  151.  
  152.             <!-- flow control -->
  153.             <!--KEYWORD1>call absolute</KEYWORD1 -->
  154.             <!-- KEYWORD1>call interrupt</KEYWORD1 -->
  155.             <KEYWORD1>call</KEYWORD1>
  156.             <KEYWORD1>call</KEYWORD1>
  157.             <KEYWORD1>case</KEYWORD1>
  158.             <KEYWORD1>def</KEYWORD1>
  159.             <KEYWORD1>do</KEYWORD1>
  160.             <KEYWORD1>elseif</KEYWORD1>
  161.             <!-- KEYWORD1>end case</KEYWORD1>
  162.             <KEYWORD1>case else</KEYWORD1 -->
  163.             <KEYWORD1>else</KEYWORD1>
  164.             <KEYWORD1>end</KEYWORD1>
  165.             <KEYWORD1>loop</KEYWORD1>
  166.             <KEYWORD1>exit</KEYWORD1>
  167.             <KEYWORD1>for</KEYWORD1>
  168.             <KEYWORD1>next</KEYWORD1>
  169.             <KEYWORD1>gosub</KEYWORD1>
  170.             <KEYWORD1>goto</KEYWORD1>
  171.             <KEYWORD1>if</KEYWORD1>
  172.             <KEYWORD1>inline</KEYWORD1>
  173.             <KEYWORD1>resume</KEYWORD1>
  174.             <KEYWORD1>return</KEYWORD1>
  175.             <KEYWORD1>select</KEYWORD1>
  176.             <KEYWORD1>step</KEYWORD1>
  177.             <KEYWORD1>stop</KEYWORD1>
  178.             <KEYWORD1>sub</KEYWORD1>
  179.             <KEYWORD1>then</KEYWORD1>
  180.             <KEYWORD1>to</KEYWORD1>
  181.             <KEYWORD1>until</KEYWORD1>
  182.             <!-- KEYWORD1>def fn</KEYWORD1>
  183.             <KEYWORD1>end def</KEYWORD1>
  184.             <KEYWORD1>end sub</KEYWORD1 -->
  185.             <KEYWORD1>wend</KEYWORD1>
  186.             <KEYWORD1>while</KEYWORD1>
  187.  
  188.             <!-- draw/graphics -->
  189.             <KEYWORD1>circle</KEYWORD1>
  190.             <KEYWORD1>draw</KEYWORD1>
  191.             <KEYWORD1>line</KEYWORD1>
  192.             <KEYWORD1>paint</KEYWORD1>
  193.             <!-- KEYWORD1>palette using</KEYWORD1 -->
  194.             <KEYWORD1>palette</KEYWORD1>
  195.             <KEYWORD1>peek</KEYWORD1>
  196.             <KEYWORD1>pen</KEYWORD1>
  197.             <KEYWORD1>pmap</KEYWORD1>
  198.             <KEYWORD1>point</KEYWORD1>
  199.             <KEYWORD1>poke</KEYWORD1>
  200.             <KEYWORD1>preset</KEYWORD1>
  201.             <KEYWORD1>pset</KEYWORD1>
  202.             <KEYWORD1>put</KEYWORD1>
  203.             <KEYWORD1>view</KEYWORD1>
  204.             <KEYWORD1>window</KEYWORD1>
  205.  
  206.             <!-- hardware events -->
  207.             <KEYWORD1>mtimer</KEYWORD1>
  208.             <KEYWORD1>off</KEYWORD1>
  209.             <KEYWORD1>on</KEYWORD1>
  210.             <!-- KEYWORD1>on com</KEYWORD1>
  211.             <KEYWORD1>on error</KEYWORD1>
  212.             <KEYWORD1>on key</KEYWORD1>
  213.             <KEYWORD1>on pen</KEYWORD1>
  214.             <KEYWORD1>on play</KEYWORD1>
  215.             <KEYWORD1>on strig</KEYWORD1>
  216.             <KEYWORD1>on timer</KEYWORD1 -->
  217.             <KEYWORD1>stick</KEYWORD1>
  218.             <KEYWORD1>strig</KEYWORD1>
  219.             <KEYWORD1>timer</KEYWORD1>
  220.             <KEYWORD1>wait</KEYWORD1>
  221.  
  222.             <!--input -->
  223.             <KEYWORD1>inkey$</KEYWORD1>
  224.             <KEYWORD1>input$</KEYWORD1>
  225.             <!-- KEYWORD1>input #</KEYWORD1 -->
  226.             <KEYWORD1>input</KEYWORD1>
  227.             <KEYWORD1>instat</KEYWORD1>
  228.             <!-- KEYWORD1>line input</KEYWORD1 -->
  229.             <KEYWORD1>read</KEYWORD1>
  230.             <KEYWORD1>restore</KEYWORD1>
  231.  
  232.             <!-- keyboard -->
  233.             <!-- KEYWORD1>key on</KEYWORD1>
  234.             <KEYWORD1>key off</KEYWORD1 -->
  235.             <KEYWORD1>key</KEYWORD1>
  236.  
  237.             <!-- memory -->
  238.             <KEYWORD1>clear</KEYWORD1>
  239.             <!-- KEYWORD1>def seg</KEYWORD1 -->
  240.             <KEYWORD1>endmem</KEYWORD1>
  241.             <KEYWORD1>erase</KEYWORD1>
  242.             <KEYWORD1>fre</KEYWORD1>
  243.             <KEYWORD1>memset</KEYWORD1>
  244.             <KEYWORD1>poke</KEYWORD1>
  245.             <KEYWORD1>seg</KEYWORD1>
  246.             <KEYWORD1>varptr$</KEYWORD1>
  247.             <KEYWORD1>varptr</KEYWORD1>
  248.             <KEYWORD1>varseg</KEYWORD1>
  249.  
  250.             <!-- metastatements -->
  251.             <KEYWORD2>$com1</KEYWORD2>
  252.             <KEYWORD2>$com2</KEYWORD2>
  253.             <KEYWORD2>$com</KEYWORD2>
  254.             <KEYWORD2>$debug</KEYWORD2>
  255.             <KEYWORD2>$dynamic</KEYWORD2>
  256.             <KEYWORD2>$event</KEYWORD2>
  257.             <KEYWORD2>$if</KEYWORD2>
  258.             <KEYWORD2>$else</KEYWORD2>
  259.             <KEYWORD2>$endif</KEYWORD2>
  260.             <KEYWORD2>$include</KEYWORD2>
  261.             <KEYWORD2>$inline</KEYWORD2>
  262.             <KEYWORD2>$list</KEYWORD2>
  263.             <KEYWORD2>$option</KEYWORD2>
  264.             <KEYWORD2>$segment</KEYWORD2>
  265.             <KEYWORD2>$sound</KEYWORD2>
  266.             <KEYWORD2>$stack</KEYWORD2>
  267.             <KEYWORD2>$static</KEYWORD2>
  268.  
  269.             <!-- Miscellaneous -->
  270.             <KEYWORD1>data</KEYWORD1>
  271.             <KEYWORD1>delay</KEYWORD1>
  272.             <KEYWORD1>reg</KEYWORD1>
  273.             <KEYWORD1>swap</KEYWORD1>
  274.  
  275.  
  276.             <!-- Math Functions -->
  277.             <FUNCTION>abs</FUNCTION>
  278.             <FUNCTION>asc</FUNCTION>
  279.             <FUNCTION>atn</FUNCTION>
  280.             <FUNCTION>cdbl</FUNCTION>
  281.             <FUNCTION>ceil</FUNCTION>
  282.             <FUNCTION>cint</FUNCTION>
  283.             <FUNCTION>clng</FUNCTION>
  284.             <FUNCTION>cos</FUNCTION>
  285.             <FUNCTION>csng</FUNCTION>
  286.             <FUNCTION>cvi</FUNCTION>
  287.             <FUNCTION>cvl</FUNCTION>
  288.             <FUNCTION>cvs</FUNCTION>
  289.             <FUNCTION>cvd</FUNCTION>
  290.             <FUNCTION>cvmd</FUNCTION>
  291.             <FUNCTION>cvms</FUNCTION>
  292.             <KEYWORD2>decr</KEYWORD2>
  293.             <KEYWORD2>defint</KEYWORD2>
  294.             <KEYWORD2>deflng</KEYWORD2>
  295.             <KEYWORD2>defsng</KEYWORD2>
  296.             <KEYWORD2>defdbl</KEYWORD2>
  297.             <KEYWORD2>defstr</KEYWORD2>
  298.             <FUNCTION>exp2</FUNCTION>
  299.             <FUNCTION>exp10</FUNCTION>
  300.             <FUNCTION>exp</FUNCTION>
  301.             <FUNCTION>fix</FUNCTION>
  302.             <KEYWORD2>incr</KEYWORD2>
  303.             <FUNCTION>int</FUNCTION>
  304.             <FUNCTION>log10</FUNCTION>
  305.             <FUNCTION>log2</FUNCTION>
  306.             <FUNCTION>log</FUNCTION>
  307.             <FUNCTION>mki$</FUNCTION>
  308.             <FUNCTION>mkl$</FUNCTION>
  309.             <FUNCTION>mks$</FUNCTION>
  310.             <FUNCTION>mkd$</FUNCTION>
  311.             <FUNCTION>mkmd$</FUNCTION>
  312.             <FUNCTION>mkms$</FUNCTION>
  313.             <KEYWORD2>randomize</KEYWORD2>
  314.             <KEYWORD2>random</KEYWORD2>
  315.             <FUNCTION>rnd</FUNCTION>
  316.             <FUNCTION>sgn</FUNCTION>
  317.             <FUNCTION>sin</FUNCTION>
  318.             <FUNCTION>spc</FUNCTION>
  319.             <FUNCTION>sqr</FUNCTION>
  320.             <FUNCTION>tab</FUNCTION>
  321.             <FUNCTION>tan</FUNCTION>
  322.  
  323.             <!-- output -->
  324.             <KEYWORD1>print</KEYWORD1>
  325.             <!-- KEYWORD1>print #</KEYWORD1>
  326.             <KEYWORD1>print using</KEYWORD1 -->
  327.             <KEYWORD1>write</KEYWORD1>
  328.  
  329.             <!-- printer -->
  330.             <KEYWORD1>lpos</KEYWORD1>
  331.             <!-- KEYWORD1>lprint using</KEYWORD1  -->
  332.             <KEYWORD1>lprint</KEYWORD1>
  333.  
  334.             <!-- screen -->
  335.             <KEYWORD1>cls</KEYWORD1>
  336.             <KEYWORD1>color</KEYWORD1>
  337.             <KEYWORD1>csrlin</KEYWORD1>
  338.             <KEYWORD1>locate</KEYWORD1>
  339.             <KEYWORD1>pos</KEYWORD1>
  340.             <KEYWORD1>screen</KEYWORD1>
  341.             <KEYWORD1>width</KEYWORD1>
  342.  
  343.             <!-- sound -->
  344.             <KEYWORD1>beep</KEYWORD1>
  345.             <KEYWORD1>play</KEYWORD1>
  346.             <KEYWORD1>sound</KEYWORD1>
  347.  
  348.             <!-- strings -->
  349.             <FUNCTION>bin$</FUNCTION>
  350.             <FUNCTION>chr$</FUNCTION>
  351.             <FUNCTION>get$</FUNCTION>
  352.             <FUNCTION>hex$</FUNCTION>
  353.             <FUNCTION>instr</FUNCTION>
  354.             <FUNCTION>lcase$</FUNCTION>
  355.             <FUNCTION>left$</FUNCTION>
  356.             <FUNCTION>len</FUNCTION>
  357.             <FUNCTION>mid$</FUNCTION>
  358.             <FUNCTION>oct$</FUNCTION>
  359.             <FUNCTION>right$</FUNCTION>
  360.             <FUNCTION>space$</FUNCTION>
  361.             <FUNCTION>str$</FUNCTION>
  362.             <FUNCTION>string$</FUNCTION>
  363.             <FUNCTION>ucase$</FUNCTION>
  364.             <FUNCTION>val</FUNCTION>
  365.  
  366.         </KEYWORDS>
  367.     </RULES>
  368. </MODE>
  369.